package com.common.platform.sys.util;

import java.math.BigDecimal;
import java.math.BigInteger;

public class DecimalUtil {
    public static Long getLong(Object object){
        if(object==null){
            return null;
        }
        if(object instanceof BigDecimal){
            return ((BigDecimal) object).longValue();
        }
        if(object instanceof BigDecimal){
            return ((BigInteger) object).longValue();
        }
        if(object instanceof Long){
            return ((Long) object);

        }
        return null;
    }
}
